{extend name="layout" /}
{block name="content"}
<div class="mui-content">
	{eq name='$uinfo.realauth' value='1'}
	<div class="tm-integral-section" style="background: #ff4444;">
		<div class="uk-margin-xsmall-bottom">
			<img src="{$images_path}name-card.png" width="90" height="90" />
		</div>
		<div class="uk-text-medium">你已通过实名认证</div>
	</div>
	<div class="tm-padded-smedium tm-panel">
		<div class="uk-text-xsmall uk-margin-small-bottom">
			身份证照片信息
		</div>
		<div class="uk-grid uk-grid-small uk-text-xsmall">
			<div class="uk-width-1-2">
				<div class="uk-margin-small-bottom uk-text-muted">正面</div>
				<div class="uk-form-file tm-card-loaditem">
					<div class="tm-card-loaditem-img" style="">
						<img src="{$info.cardphoto1}" />
					</div>
				</div>
			</div>
			<div class="uk-width-1-2">
				<div class="uk-margin-small-bottom uk-text-muted">反面</div>
				<div class="uk-form-file tm-card-loaditem">
					<div class="tm-card-loaditem-img">
						<img src="{$info.cardphoto1}" />
					</div>
				</div>
			</div>
		</div>
	</div>
	<div>
		<div class="mui-table-view mui-in-zero">
			<div class="mui-table-view-cell mui-media no-active-bg">
				<div class="mui-table uk-text-xsmall">
					<div class="mui-table-cell uk-text-middle uk-width-1-4">
						<span>姓名</span>
					</div>
					<div class="mui-table-cell uk-text-middle">
						<div class="uk-input-blank">
							<span class="uk-text-muted">{$info.realname}</span>
						</div>
					</div>
				</div>
			</div>
			<div class="mui-table-view-cell mui-media no-active-bg">
				<div class="mui-table uk-text-xsmall">
					<div class="mui-table-cell uk-text-middle uk-width-1-4">
						<span>身份证号</span>
					</div>
					<div class="mui-table-cell uk-text-middle">
						<div class="uk-input-blank">
							<span class="uk-text-muted">{$info.idcard}</span>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
	{else /}
	<form id="infoform">
		<div class="tm-padded-smedium tm-panel">
			<div class="uk-text-xsmall uk-margin-small-bottom">
				身份证照片信息
			</div>
			<div class="uk-grid uk-grid-small uk-text-xsmall">
				<div class="uk-width-1-2">
					<div class="uk-margin-small-bottom uk-text-muted">正面</div>
					<div class="uk-form-file tm-card-loaditem">
						{eq name=':isset($info.cardphoto1)' value='true'}
						<div class="tm-card-loaditem-img" style="">
							<img src="{$info.cardphoto1}" onclick="coco_open_gallery(this,7,1)" coco-callback="coco_suc" text-thumb="cardphoto1"/>
						</div>
						{else/}
						<div class="tm-card-loaditem-img" style='display: none;'>
							<img src="" onclick="coco_open_gallery(this,7,1)" coco-callback="coco_suc" text-thumb="cardphoto1" />
						</div>
						<a class="tm-card-loaditem-padded" href="Javascript:" onclick="coco_open_gallery(this,7)" coco-callback="coco_suc" text-thumb="cardphoto1">
							<div class="this-icon">
								<span class="mui-icon mui-icon-plusempty"></span>
							</div>
							<div class="this-title">身份证正面照</div>
						</a>
						{/eq}
					</div>
					<input type="hidden" id="cardphoto1" name="cardphoto1" value="{$info.cardphoto1}">
				</div>
				<div class="uk-width-1-2">
					<div class="uk-margin-small-bottom uk-text-muted">反面</div>
					<div class="uk-form-file tm-card-loaditem">
						{eq name=':isset($info.cardphoto2)' value='true'}
						<div class="tm-card-loaditem-img" style="">
							<img src="{$info.cardphoto2}" onclick="coco_open_gallery(this,7,1)" coco-callback="coco_suc" text-thumb="cardphoto2"/>
						</div>
						{else /}
						<div class="tm-card-loaditem-img" style='display: none;'>
							<img src="" onclick="coco_open_gallery(this,7,1)" coco-callback="coco_suc" text-thumb="cardphoto2"/>
						</div>
						<a class="tm-card-loaditem-padded" href="Javascript:"  onclick="coco_open_gallery(this,7)" coco-callback="coco_suc" text-thumb="cardphoto2">
							<div class="this-icon">
								<span class="mui-icon mui-icon-plusempty"></span>
							</div>
							<div class="this-title">身份证正面照</div>
						</a>
						{/eq}
					</div>
					<input type="hidden" id="cardphoto2" name="cardphoto2" value="{$info.cardphoto2}">
				</div>
			</div>
		</div>
		<div>
			<div class="mui-table-view mui-in-zero">
				<div class="mui-table-view-cell mui-media no-active-bg">
					<div class="mui-table uk-text-xsmall">
						<div class="mui-table-cell uk-text-middle uk-width-1-4">
							<span>姓名</span>
						</div>
						<div class="mui-table-cell uk-text-middle">
							<div class="uk-input-blank">
								<input class="uk-input" name="realname" type="text" id="realname" value="{$info.realname}" placeholder="输入姓名" />
							</div>
						</div>
					</div>
				</div>
				<div class="mui-table-view-cell mui-media no-active-bg">
					<div class="mui-table uk-text-xsmall">
						<div class="mui-table-cell uk-text-middle uk-width-1-4">
							<span>身份证号</span>
						</div>
						<div class="mui-table-cell uk-text-middle">
							<div class="uk-input-blank">
								<input class="uk-input" type="text" name="idcard" id="idcard" value="{$info.idcard}" placeholder="输入身份证号" />
							</div>
						</div>
					</div>
				</div>
			</div>
			<input class="uk-input" type="hidden" name="id" id="id" value="{$info.id}"/>
		</div>
		<div class="tm-padded-medium">
			{eq name=':isset($info.cardphoto1)' value='true'}
			<div class="uk-text-small uk-text-muted-2 uk-text-center uk-margin-xsmall-bottom">
				<div>认证信息已提交，请耐心等待审核</div>
				<div class="uk-text-warning">
					1个工作日后，若未通过审核，请检查信息并修改
				</div>
			</div>
			<div>
				<button type="button" class="mui-btn mui-btn-warning mui-btn-medium uk-width-1-1 cocoPostFormAjax" ajaxurl="{:url('/v1/MemberRealname/add')}" formid="infoform" ajax-callback="suc_back">重新审核</button>
			</div>
			{else /}
			<div class="uk-text-small uk-text-muted-2 uk-text-center uk-margin-xsmall-bottom">
				<div>认证信息已提交，请耐心等待审核</div>
				<div class="uk-text-warning">
					1个工作日后，若未通过审核，请检查信息并修改
				</div>
			</div>
			<div>
				<button type="button" class="mui-btn mui-btn-warning mui-btn-medium uk-width-1-1 cocoPostFormAjax" ajaxurl="{:url('/v1/MemberRealname/add')}" formid="infoform" ajax-callback="suc_back">提交审核</button>
			</div>
			{/eq}
		</div>
	</form>
	{/eq}
</div>
{/block}
{block name="script"}
<script type="text/javascript">
	function suc_back(obj, data) {
		
		coco_alert('添加成功',function () {
			coco_close_window();
		});
	}
</script>
{/block}